package com.zxy.ziems.server.production.convertor;

import com.zxy.ziems.server.monitor.pojo.dto.MonitorDeviceDTO;
import com.zxy.ziems.server.monitor.pojo.dto.MonitorGroupAddDTO;
import com.zxy.ziems.server.monitor.pojo.entity.MonitorDeviceEntity;
import com.zxy.ziems.server.monitor.pojo.vo.MonitorDeviceVO;
import com.zxy.ziems.server.production.pojo.entity.CustXyhProsalestoreEntity;
import com.zxy.ziems.server.production.pojo.vo.CustXyhProsalestoreVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author chdzq
 * @create 2023/3/28
 */
@Mapper(
)
public interface ProductionConvertor {
    ProductionConvertor INSTANCE = Mappers.getMapper(ProductionConvertor.class);


    /**
     * 监控组
     *
     * @param dto
     * @return
     */
    CustXyhProsalestoreEntity monitorGroupDTOConvert2DO(MonitorGroupAddDTO dto);

    @Mapping(target = "inventoryDeliveryDate", source = "inventoryDeliveryDate")
    List<CustXyhProsalestoreVo> custXyhProsalestoreDOListConvert2VOList(List<CustXyhProsalestoreEntity> list);

    /**
     * 监控设备
     *
     * @param monitorDeviceEntityList
     * @return
     */
    List<MonitorDeviceVO> monitorDeviceDOListConvert2VOList(List<MonitorDeviceEntity> monitorDeviceEntityList);

    List<MonitorDeviceEntity> monitorDeviceDTOListConvert2DOList(List<MonitorDeviceDTO> monitorDeviceDTOList);
}
